package org.dialMsg.Server.ServerImp;

import org.dialMsg.Mapper.UserMapper;
import org.dialMsg.Pojo.User;
import org.dialMsg.Server.ServerInt.UserServerInter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author DPF
 */
@Service
public class UserServiceImp implements UserServerInter {
    @Autowired
    private UserMapper userMapper;


    @Override
    public List<User> findAll() {
        return userMapper.findAll();
    }

    @Override
    public User findUserById(Integer id) {
        return userMapper.findById(id) == null ? null : userMapper.findById(id);
    }
}
